/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 80020
 Source Host           : localhost:3306
 Source Schema         : checkup

 Target Server Type    : MySQL
 Target Server Version : 80020
 File Encoding         : 65001

 Date: 12/10/2021 20:19:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for check_admin
-- ----------------------------
DROP TABLE IF EXISTS `check_admin`;
CREATE TABLE `check_admin` (
  `work_id` varchar(50) NOT NULL COMMENT '工号',
  `name` varchar(30) NOT NULL COMMENT '姓名',
  `password` varchar(40) NOT NULL COMMENT '密码',
  `area_id` int NOT NULL COMMENT '所属检查区',
  PRIMARY KEY (`work_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of check_admin
-- ----------------------------
BEGIN;
INSERT INTO `check_admin` VALUES ('cai001', '蔡栗', '111222', 9);
INSERT INTO `check_admin` VALUES ('jc001', '张倩', '123123', 1);
INSERT INTO `check_admin` VALUES ('jc002', '李伟', '111222', 1);
COMMIT;

-- ----------------------------
-- Table structure for check_area
-- ----------------------------
DROP TABLE IF EXISTS `check_area`;
CREATE TABLE `check_area` (
  `area_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '检查区id',
  `area_name` varchar(50) DEFAULT NULL COMMENT '检查区名',
  `area_description` varchar(150) DEFAULT NULL COMMENT '检查区描述',
  `area_address` varchar(150) DEFAULT NULL COMMENT '检查区地址',
  PRIMARY KEY (`area_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of check_area
-- ----------------------------
BEGIN;
INSERT INTO `check_area` VALUES (1, '基础检查区', '具有基础测量1与基础测量2两个检查室，主要检查项目为一般检查。', '体检中心1楼');
INSERT INTO `check_area` VALUES (2, '采血区', '主要有三个窗口。', '体检中心2楼');
INSERT INTO `check_area` VALUES (3, '眼科', '2个科室', '体检中心1楼');
INSERT INTO `check_area` VALUES (4, '耳鼻喉科', '2个科室', '体检中心2楼');
INSERT INTO `check_area` VALUES (5, '内科', '内科男和内科女', '体检中心1楼');
INSERT INTO `check_area` VALUES (6, '外科', '外科男和外科女', '体检中心1楼');
INSERT INTO `check_area` VALUES (7, '放射科', '2个胸透室', '体检中心地下1层');
INSERT INTO `check_area` VALUES (8, '心电图区', '2个心电图室', '体检中心2楼');
INSERT INTO `check_area` VALUES (9, '超声科', '7个科室', '体检中心1楼');
INSERT INTO `check_area` VALUES (10, '尿检区', '1个科室', '体检中心2楼');
COMMIT;

-- ----------------------------
-- Table structure for check_group
-- ----------------------------
DROP TABLE IF EXISTS `check_group`;
CREATE TABLE `check_group` (
  `group_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '检查组id',
  `group_name` varchar(100) NOT NULL COMMENT '检查组名称',
  `item_list` json DEFAULT NULL COMMENT '包含的项目id数组',
  `waste` int unsigned DEFAULT NULL,
  PRIMARY KEY (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of check_group
-- ----------------------------
BEGIN;
INSERT INTO `check_group` VALUES (1, '一般检查', '[1]', 2);
INSERT INTO `check_group` VALUES (2, '血常规、肝功能6项、肾功能三项', '[10, 11, 12]', 4);
INSERT INTO `check_group` VALUES (3, '眼科常规、裂隙灯检查', '[2, 3]', 2);
INSERT INTO `check_group` VALUES (4, '耳鼻喉科检查', '[15]', 2);
INSERT INTO `check_group` VALUES (5, '内科', '[4]', 4);
INSERT INTO `check_group` VALUES (6, '外科', '[5]', 4);
INSERT INTO `check_group` VALUES (7, '胸部正位片', '[14]', 2);
INSERT INTO `check_group` VALUES (8, '心电图', '[13]', 4);
INSERT INTO `check_group` VALUES (9, '肝胆脾胰彩超、双肾彩超、前列腺彩超', '[6, 7, 8]', 10);
INSERT INTO `check_group` VALUES (10, '肝胆脾胰彩超、双肾彩超、子宫附件彩超', '[6, 7, 9]', 10);
INSERT INTO `check_group` VALUES (11, '乳腺彩超', '[17]', 3);
INSERT INTO `check_group` VALUES (12, '甲状腺彩超', '[18]', 3);
INSERT INTO `check_group` VALUES (13, '尿常规', '[16]', 1);
COMMIT;

-- ----------------------------
-- Table structure for check_item
-- ----------------------------
DROP TABLE IF EXISTS `check_item`;
CREATE TABLE `check_item` (
  `item_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '体检项目id，主键',
  `item_name` varchar(50) DEFAULT NULL COMMENT '体检项目名',
  `item_description` varchar(255) DEFAULT NULL COMMENT '体检项目描述',
  `note` int DEFAULT NULL COMMENT '备注，0无需，1需空腹，2需憋尿，3需辐射',
  PRIMARY KEY (`item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of check_item
-- ----------------------------
BEGIN;
INSERT INTO `check_item` VALUES (1, '一般检查', '了解血压，身高，体重，体重指数等。', 0);
INSERT INTO `check_item` VALUES (2, '眼科常规', '外眼等常规检查', 0);
INSERT INTO `check_item` VALUES (3, '裂隙灯检查', '主要检查眼角膜和晶状体有无病变（如白内障）等。', 0);
INSERT INTO `check_item` VALUES (4, '内科', '通过望触叩听检查判断是否心肺异常，肝脾肿大、腹部包块等', 0);
INSERT INTO `check_item` VALUES (5, '外科', '浅表淋巴结，甲状腺、脊柱、四肢等。', 0);
INSERT INTO `check_item` VALUES (6, '肝胆脾胰彩超', '检查肝脏、胆囊、胆管、脾脏、胰腺等是否异常病变发生。', 1);
INSERT INTO `check_item` VALUES (7, '双肾彩超', '更清晰的检查肾癌、游走肾等是否异常病变发生。', 0);
INSERT INTO `check_item` VALUES (8, '前列腺彩超', '(憋尿)检查能较好的显示前列腺的形态、大小，对于前列腺增生、肥大、钙化等疾病具有诊断意义。', 2);
INSERT INTO `check_item` VALUES (9, '子宫附件彩超', '(需憋尿至膀胱充盈)经腹部观察子宫、卵巢、盆腔等生殖器是否有病变发生。', 2);
INSERT INTO `check_item` VALUES (10, '血常规', '通过检测血液细胞的计数及不同种类细胞、成分的分类来反映身体状况，如：贫血、感染、血液系统疾病、物理化学因素损伤等。', 1);
INSERT INTO `check_item` VALUES (11, '肝功能6项', '肝功能筛查。', 1);
INSERT INTO `check_item` VALUES (12, '肾功能三项', '尿素（Urea）、肌酐（CR）、尿酸（UA）。', 1);
INSERT INTO `check_item` VALUES (13, '心电图', '检查心肌梗塞、心律不齐、心肌缺血等疾病。', 0);
INSERT INTO `check_item` VALUES (14, '胸部正位片', '有无肺部疾病及心脏、主动脉、纵膈、横膈疾病等。（含辐射，怀孕备孕及哺乳期禁做）', 3);
INSERT INTO `check_item` VALUES (15, '耳鼻喉科', '检查有无中耳炎、鼻炎、慢性扁桃体炎、鼻中隔偏曲、咽炎等疾病。', 0);
INSERT INTO `check_item` VALUES (16, '尿常规', '可提示有无泌尿系统疾患：如急、慢性肾炎，肾盂肾炎，膀胱炎，尿道炎，肾病综合征，狼疮性肾炎，血红蛋白尿，肾梗塞、肾小管重金属盐及药物导致急性肾小管坏死，肾或膀胱肿瘤以及有无尿糖等。', 4);
INSERT INTO `check_item` VALUES (17, '乳腺彩超', '可提示有否乳腺肿块或乳腺占位性病变等。', 0);
INSERT INTO `check_item` VALUES (18, '甲状腺彩超', '检查甲状腺疾患。', 0);
COMMIT;

-- ----------------------------
-- Table structure for check_plan
-- ----------------------------
DROP TABLE IF EXISTS `check_plan`;
CREATE TABLE `check_plan` (
  `plan_id` int NOT NULL AUTO_INCREMENT COMMENT '套餐id，主键',
  `plan_name` varchar(50) DEFAULT NULL COMMENT '套餐名',
  `plan_price` decimal(10,2) DEFAULT NULL COMMENT '套餐价格',
  `plan_description` varchar(255) DEFAULT NULL COMMENT '套餐描述',
  PRIMARY KEY (`plan_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of check_plan
-- ----------------------------
BEGIN;
INSERT INTO `check_plan` VALUES (1, '常规入职体检套餐(男士)', 376.00, '含肝胆脾胰肾等重要器官筛查，以及肺部疾病筛查。');
INSERT INTO `check_plan` VALUES (2, '常规入职体检套餐(女士)', 376.00, '含肝胆脾胰肾等重要器官筛查，以及肺部疾病筛查。');
INSERT INTO `check_plan` VALUES (3, '退休者及老人关怀(男士)', 1295.00, '含一般检查，腹部彩超，和生化全套等重要检查，同时包含部分肿瘤的筛查。');
COMMIT;

-- ----------------------------
-- Table structure for check_room
-- ----------------------------
DROP TABLE IF EXISTS `check_room`;
CREATE TABLE `check_room` (
  `room_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '检查室id',
  `room_name` varchar(50) NOT NULL COMMENT '检查室名称',
  `area_id` int NOT NULL COMMENT '所属检查室id',
  `group_id` int NOT NULL COMMENT '检查组id',
  `gender_restrictions` int DEFAULT '0' COMMENT '性别限制，0无，1为男，2为女',
  `group_note` int DEFAULT '0' COMMENT '备注，0无需，1需空腹，2需憋尿，3需辐射',
  PRIMARY KEY (`room_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of check_room
-- ----------------------------
BEGIN;
INSERT INTO `check_room` VALUES (1, '基础测量1', 1, 1, 0, 0);
INSERT INTO `check_room` VALUES (2, '基础测量2', 1, 1, 0, 0);
INSERT INTO `check_room` VALUES (3, '采血窗口1', 2, 2, 0, 1);
INSERT INTO `check_room` VALUES (4, '采血窗口2', 2, 2, 0, 1);
INSERT INTO `check_room` VALUES (5, '采血窗口3', 2, 2, 0, 1);
INSERT INTO `check_room` VALUES (6, '眼科1室', 3, 3, 0, 0);
INSERT INTO `check_room` VALUES (7, '眼科2室', 3, 3, 0, 0);
INSERT INTO `check_room` VALUES (8, '耳鼻喉科1室', 4, 4, 0, 0);
INSERT INTO `check_room` VALUES (9, '耳鼻喉科2室', 4, 4, 0, 0);
INSERT INTO `check_room` VALUES (10, '内科（男）', 5, 5, 1, 0);
INSERT INTO `check_room` VALUES (11, '内科（女）', 5, 5, 2, 0);
INSERT INTO `check_room` VALUES (12, '外科（男）', 6, 6, 1, 0);
INSERT INTO `check_room` VALUES (13, '外科（女）', 6, 6, 2, 0);
INSERT INTO `check_room` VALUES (14, '胸透1室', 7, 7, 0, 3);
INSERT INTO `check_room` VALUES (15, '胸透2室', 7, 7, 0, 3);
INSERT INTO `check_room` VALUES (16, '心电图室(男)', 8, 8, 1, 0);
INSERT INTO `check_room` VALUES (17, '心电图室(女)', 8, 8, 2, 0);
INSERT INTO `check_room` VALUES (18, '彩超1室(男)', 9, 9, 1, 2);
INSERT INTO `check_room` VALUES (19, '彩超2室(男)', 9, 9, 1, 2);
INSERT INTO `check_room` VALUES (20, '彩超3室(女)', 9, 10, 2, 2);
INSERT INTO `check_room` VALUES (21, '彩超4室(女)', 9, 10, 2, 2);
INSERT INTO `check_room` VALUES (22, '彩超5室(女)', 9, 11, 2, 0);
INSERT INTO `check_room` VALUES (23, '彩超6室', 9, 12, 0, 0);
INSERT INTO `check_room` VALUES (24, '彩超7室', 9, 12, 0, 0);
INSERT INTO `check_room` VALUES (25, '尿常规检验室', 10, 13, 0, 4);
COMMIT;

-- ----------------------------
-- Table structure for patient_group
-- ----------------------------
DROP TABLE IF EXISTS `patient_group`;
CREATE TABLE `patient_group` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '业务主键',
  `patient_id` int NOT NULL,
  `group_id` int NOT NULL,
  `status` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `patient_group_single` (`patient_id`,`group_id`) COMMENT '单条记录无需被插入两次'
) ENGINE=InnoDB AUTO_INCREMENT=320 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of patient_group
-- ----------------------------
BEGIN;
INSERT INTO `patient_group` VALUES (1, 1098, 1, 0);
INSERT INTO `patient_group` VALUES (2, 1098, 2, 0);
INSERT INTO `patient_group` VALUES (3, 1098, 3, 0);
INSERT INTO `patient_group` VALUES (4, 1098, 4, 0);
INSERT INTO `patient_group` VALUES (5, 1098, 5, 0);
INSERT INTO `patient_group` VALUES (6, 1098, 6, 0);
INSERT INTO `patient_group` VALUES (7, 1098, 7, 0);
INSERT INTO `patient_group` VALUES (8, 1098, 8, 0);
INSERT INTO `patient_group` VALUES (9, 1098, 9, 0);
INSERT INTO `patient_group` VALUES (10, 1098, 12, 0);
INSERT INTO `patient_group` VALUES (11, 1098, 13, 0);
INSERT INTO `patient_group` VALUES (45, 1022, 1, 0);
INSERT INTO `patient_group` VALUES (46, 1022, 2, 0);
INSERT INTO `patient_group` VALUES (47, 1022, 3, 0);
INSERT INTO `patient_group` VALUES (48, 1022, 4, 0);
INSERT INTO `patient_group` VALUES (49, 1022, 5, 0);
INSERT INTO `patient_group` VALUES (50, 1022, 6, 0);
INSERT INTO `patient_group` VALUES (51, 1022, 7, 0);
INSERT INTO `patient_group` VALUES (52, 1022, 8, 0);
INSERT INTO `patient_group` VALUES (53, 1022, 10, 0);
INSERT INTO `patient_group` VALUES (54, 1022, 12, 0);
INSERT INTO `patient_group` VALUES (55, 1022, 13, 0);
INSERT INTO `patient_group` VALUES (56, 1077, 1, 0);
INSERT INTO `patient_group` VALUES (57, 1077, 2, 0);
INSERT INTO `patient_group` VALUES (58, 1077, 3, 0);
INSERT INTO `patient_group` VALUES (59, 1077, 4, 0);
INSERT INTO `patient_group` VALUES (60, 1077, 5, 0);
INSERT INTO `patient_group` VALUES (61, 1077, 6, 0);
INSERT INTO `patient_group` VALUES (62, 1077, 7, 0);
INSERT INTO `patient_group` VALUES (63, 1077, 8, 0);
INSERT INTO `patient_group` VALUES (64, 1077, 9, 0);
INSERT INTO `patient_group` VALUES (65, 1077, 12, 0);
INSERT INTO `patient_group` VALUES (66, 1077, 13, 0);
INSERT INTO `patient_group` VALUES (67, 1023, 1, 0);
INSERT INTO `patient_group` VALUES (68, 1023, 2, 0);
INSERT INTO `patient_group` VALUES (69, 1023, 3, 0);
INSERT INTO `patient_group` VALUES (70, 1023, 4, 0);
INSERT INTO `patient_group` VALUES (71, 1023, 5, 0);
INSERT INTO `patient_group` VALUES (72, 1023, 6, 0);
INSERT INTO `patient_group` VALUES (73, 1023, 7, 0);
INSERT INTO `patient_group` VALUES (74, 1023, 8, 0);
INSERT INTO `patient_group` VALUES (75, 1023, 9, 0);
INSERT INTO `patient_group` VALUES (76, 1023, 12, 0);
INSERT INTO `patient_group` VALUES (77, 1023, 13, 0);
INSERT INTO `patient_group` VALUES (78, 2010, 1, 0);
INSERT INTO `patient_group` VALUES (79, 2010, 2, 0);
INSERT INTO `patient_group` VALUES (80, 2010, 3, 0);
INSERT INTO `patient_group` VALUES (81, 2010, 4, 0);
INSERT INTO `patient_group` VALUES (82, 2010, 5, 0);
INSERT INTO `patient_group` VALUES (83, 2010, 6, 0);
INSERT INTO `patient_group` VALUES (84, 2010, 7, 0);
INSERT INTO `patient_group` VALUES (85, 2010, 8, 0);
INSERT INTO `patient_group` VALUES (86, 2010, 9, 0);
INSERT INTO `patient_group` VALUES (87, 2010, 12, 0);
INSERT INTO `patient_group` VALUES (88, 2010, 13, 0);
INSERT INTO `patient_group` VALUES (89, 1044, 1, 0);
INSERT INTO `patient_group` VALUES (90, 1044, 2, 0);
INSERT INTO `patient_group` VALUES (91, 1044, 3, 0);
INSERT INTO `patient_group` VALUES (92, 1044, 4, 0);
INSERT INTO `patient_group` VALUES (93, 1044, 5, 0);
INSERT INTO `patient_group` VALUES (94, 1044, 6, 0);
INSERT INTO `patient_group` VALUES (95, 1044, 7, 0);
INSERT INTO `patient_group` VALUES (96, 1044, 8, 0);
INSERT INTO `patient_group` VALUES (97, 1044, 9, 0);
INSERT INTO `patient_group` VALUES (98, 1044, 12, 0);
INSERT INTO `patient_group` VALUES (99, 1044, 13, 0);
INSERT INTO `patient_group` VALUES (100, 2031, 1, 0);
INSERT INTO `patient_group` VALUES (101, 2031, 2, 0);
INSERT INTO `patient_group` VALUES (102, 2031, 3, 0);
INSERT INTO `patient_group` VALUES (103, 2031, 4, 0);
INSERT INTO `patient_group` VALUES (104, 2031, 5, 0);
INSERT INTO `patient_group` VALUES (105, 2031, 6, 0);
INSERT INTO `patient_group` VALUES (106, 2031, 7, 0);
INSERT INTO `patient_group` VALUES (107, 2031, 8, 0);
INSERT INTO `patient_group` VALUES (108, 2031, 10, 0);
INSERT INTO `patient_group` VALUES (109, 2031, 12, 0);
INSERT INTO `patient_group` VALUES (110, 2031, 13, 0);
INSERT INTO `patient_group` VALUES (111, 2079, 1, 0);
INSERT INTO `patient_group` VALUES (112, 2079, 2, 0);
INSERT INTO `patient_group` VALUES (113, 2079, 3, 0);
INSERT INTO `patient_group` VALUES (114, 2079, 4, 0);
INSERT INTO `patient_group` VALUES (115, 2079, 5, 0);
INSERT INTO `patient_group` VALUES (116, 2079, 6, 0);
INSERT INTO `patient_group` VALUES (117, 2079, 7, 0);
INSERT INTO `patient_group` VALUES (118, 2079, 8, 0);
INSERT INTO `patient_group` VALUES (119, 2079, 9, 0);
INSERT INTO `patient_group` VALUES (120, 2079, 12, 0);
INSERT INTO `patient_group` VALUES (121, 2079, 13, 0);
INSERT INTO `patient_group` VALUES (122, 732, 1, 0);
INSERT INTO `patient_group` VALUES (123, 732, 2, 0);
INSERT INTO `patient_group` VALUES (124, 732, 3, 0);
INSERT INTO `patient_group` VALUES (125, 732, 4, 0);
INSERT INTO `patient_group` VALUES (126, 732, 5, 0);
INSERT INTO `patient_group` VALUES (127, 732, 6, 0);
INSERT INTO `patient_group` VALUES (128, 732, 7, 0);
INSERT INTO `patient_group` VALUES (129, 732, 8, 0);
INSERT INTO `patient_group` VALUES (130, 732, 9, 0);
INSERT INTO `patient_group` VALUES (131, 732, 12, 0);
INSERT INTO `patient_group` VALUES (132, 732, 13, 0);
INSERT INTO `patient_group` VALUES (133, 722, 1, 0);
INSERT INTO `patient_group` VALUES (134, 722, 2, 0);
INSERT INTO `patient_group` VALUES (135, 722, 3, 0);
INSERT INTO `patient_group` VALUES (136, 722, 4, 0);
INSERT INTO `patient_group` VALUES (137, 722, 5, 0);
INSERT INTO `patient_group` VALUES (138, 722, 6, 0);
INSERT INTO `patient_group` VALUES (139, 722, 7, 0);
INSERT INTO `patient_group` VALUES (140, 722, 8, 0);
INSERT INTO `patient_group` VALUES (141, 722, 9, 0);
INSERT INTO `patient_group` VALUES (142, 722, 12, 0);
INSERT INTO `patient_group` VALUES (143, 722, 13, 0);
INSERT INTO `patient_group` VALUES (144, 1099, 1, 0);
INSERT INTO `patient_group` VALUES (145, 1099, 2, 0);
INSERT INTO `patient_group` VALUES (146, 1099, 3, 0);
INSERT INTO `patient_group` VALUES (147, 1099, 4, 0);
INSERT INTO `patient_group` VALUES (148, 1099, 5, 0);
INSERT INTO `patient_group` VALUES (149, 1099, 6, 0);
INSERT INTO `patient_group` VALUES (150, 1099, 7, 0);
INSERT INTO `patient_group` VALUES (151, 1099, 8, 0);
INSERT INTO `patient_group` VALUES (152, 1099, 10, 0);
INSERT INTO `patient_group` VALUES (153, 1099, 12, 0);
INSERT INTO `patient_group` VALUES (154, 1099, 13, 0);
INSERT INTO `patient_group` VALUES (155, 1121, 1, 0);
INSERT INTO `patient_group` VALUES (156, 1121, 2, 0);
INSERT INTO `patient_group` VALUES (157, 1121, 3, 0);
INSERT INTO `patient_group` VALUES (158, 1121, 4, 0);
INSERT INTO `patient_group` VALUES (159, 1121, 5, 0);
INSERT INTO `patient_group` VALUES (160, 1121, 6, 0);
INSERT INTO `patient_group` VALUES (161, 1121, 7, 0);
INSERT INTO `patient_group` VALUES (162, 1121, 8, 0);
INSERT INTO `patient_group` VALUES (163, 1121, 9, 0);
INSERT INTO `patient_group` VALUES (164, 1121, 12, 0);
INSERT INTO `patient_group` VALUES (165, 1121, 13, 0);
INSERT INTO `patient_group` VALUES (166, 1235, 1, 0);
INSERT INTO `patient_group` VALUES (167, 1235, 2, 0);
INSERT INTO `patient_group` VALUES (168, 1235, 3, 0);
INSERT INTO `patient_group` VALUES (169, 1235, 4, 0);
INSERT INTO `patient_group` VALUES (170, 1235, 5, 0);
INSERT INTO `patient_group` VALUES (171, 1235, 6, 0);
INSERT INTO `patient_group` VALUES (172, 1235, 7, 0);
INSERT INTO `patient_group` VALUES (173, 1235, 8, 0);
INSERT INTO `patient_group` VALUES (174, 1235, 9, 0);
INSERT INTO `patient_group` VALUES (175, 1235, 12, 0);
INSERT INTO `patient_group` VALUES (176, 1235, 13, 0);
INSERT INTO `patient_group` VALUES (177, 1988, 1, 0);
INSERT INTO `patient_group` VALUES (178, 1988, 2, 0);
INSERT INTO `patient_group` VALUES (179, 1988, 3, 0);
INSERT INTO `patient_group` VALUES (180, 1988, 4, 0);
INSERT INTO `patient_group` VALUES (181, 1988, 5, 0);
INSERT INTO `patient_group` VALUES (182, 1988, 6, 0);
INSERT INTO `patient_group` VALUES (183, 1988, 7, 0);
INSERT INTO `patient_group` VALUES (184, 1988, 8, 0);
INSERT INTO `patient_group` VALUES (185, 1988, 9, 0);
INSERT INTO `patient_group` VALUES (186, 1988, 12, 0);
INSERT INTO `patient_group` VALUES (187, 1988, 13, 0);
INSERT INTO `patient_group` VALUES (188, 3212, 1, 0);
INSERT INTO `patient_group` VALUES (189, 3212, 2, 0);
INSERT INTO `patient_group` VALUES (190, 3212, 3, 0);
INSERT INTO `patient_group` VALUES (191, 3212, 4, 0);
INSERT INTO `patient_group` VALUES (192, 3212, 5, 0);
INSERT INTO `patient_group` VALUES (193, 3212, 6, 0);
INSERT INTO `patient_group` VALUES (194, 3212, 7, 0);
INSERT INTO `patient_group` VALUES (195, 3212, 8, 0);
INSERT INTO `patient_group` VALUES (196, 3212, 10, 0);
INSERT INTO `patient_group` VALUES (197, 3212, 12, 0);
INSERT INTO `patient_group` VALUES (198, 3212, 13, 0);
INSERT INTO `patient_group` VALUES (199, 4652, 1, 0);
INSERT INTO `patient_group` VALUES (200, 4652, 2, 0);
INSERT INTO `patient_group` VALUES (201, 4652, 3, 0);
INSERT INTO `patient_group` VALUES (202, 4652, 4, 0);
INSERT INTO `patient_group` VALUES (203, 4652, 5, 0);
INSERT INTO `patient_group` VALUES (204, 4652, 6, 0);
INSERT INTO `patient_group` VALUES (205, 4652, 7, 0);
INSERT INTO `patient_group` VALUES (206, 4652, 8, 0);
INSERT INTO `patient_group` VALUES (207, 4652, 10, 0);
INSERT INTO `patient_group` VALUES (208, 4652, 12, 0);
INSERT INTO `patient_group` VALUES (209, 4652, 13, 0);
INSERT INTO `patient_group` VALUES (210, 1033, 1, 0);
INSERT INTO `patient_group` VALUES (211, 1033, 2, 0);
INSERT INTO `patient_group` VALUES (212, 1033, 3, 0);
INSERT INTO `patient_group` VALUES (213, 1033, 4, 0);
INSERT INTO `patient_group` VALUES (214, 1033, 5, 0);
INSERT INTO `patient_group` VALUES (215, 1033, 6, 0);
INSERT INTO `patient_group` VALUES (216, 1033, 7, 0);
INSERT INTO `patient_group` VALUES (217, 1033, 8, 0);
INSERT INTO `patient_group` VALUES (218, 1033, 9, 0);
INSERT INTO `patient_group` VALUES (219, 1033, 12, 0);
INSERT INTO `patient_group` VALUES (220, 1033, 13, 0);
INSERT INTO `patient_group` VALUES (221, 1056, 1, 0);
INSERT INTO `patient_group` VALUES (222, 1056, 2, 0);
INSERT INTO `patient_group` VALUES (223, 1056, 3, 0);
INSERT INTO `patient_group` VALUES (224, 1056, 4, 0);
INSERT INTO `patient_group` VALUES (225, 1056, 5, 0);
INSERT INTO `patient_group` VALUES (226, 1056, 6, 0);
INSERT INTO `patient_group` VALUES (227, 1056, 7, 0);
INSERT INTO `patient_group` VALUES (228, 1056, 8, 0);
INSERT INTO `patient_group` VALUES (229, 1056, 9, 0);
INSERT INTO `patient_group` VALUES (230, 1056, 12, 0);
INSERT INTO `patient_group` VALUES (231, 1056, 13, 0);
INSERT INTO `patient_group` VALUES (232, 345, 1, 0);
INSERT INTO `patient_group` VALUES (233, 345, 2, 0);
INSERT INTO `patient_group` VALUES (234, 345, 3, 0);
INSERT INTO `patient_group` VALUES (235, 345, 4, 0);
INSERT INTO `patient_group` VALUES (236, 345, 5, 0);
INSERT INTO `patient_group` VALUES (237, 345, 6, 0);
INSERT INTO `patient_group` VALUES (238, 345, 7, 0);
INSERT INTO `patient_group` VALUES (239, 345, 8, 0);
INSERT INTO `patient_group` VALUES (240, 345, 10, 0);
INSERT INTO `patient_group` VALUES (241, 345, 12, 0);
INSERT INTO `patient_group` VALUES (242, 345, 13, 0);
INSERT INTO `patient_group` VALUES (243, 1987, 1, 0);
INSERT INTO `patient_group` VALUES (244, 1987, 2, 0);
INSERT INTO `patient_group` VALUES (245, 1987, 3, 0);
INSERT INTO `patient_group` VALUES (246, 1987, 4, 0);
INSERT INTO `patient_group` VALUES (247, 1987, 5, 0);
INSERT INTO `patient_group` VALUES (248, 1987, 6, 0);
INSERT INTO `patient_group` VALUES (249, 1987, 7, 0);
INSERT INTO `patient_group` VALUES (250, 1987, 8, 0);
INSERT INTO `patient_group` VALUES (251, 1987, 9, 0);
INSERT INTO `patient_group` VALUES (252, 1987, 12, 0);
INSERT INTO `patient_group` VALUES (253, 1987, 13, 0);
INSERT INTO `patient_group` VALUES (254, 1422, 1, 0);
INSERT INTO `patient_group` VALUES (255, 1422, 2, 0);
INSERT INTO `patient_group` VALUES (256, 1422, 3, 0);
INSERT INTO `patient_group` VALUES (257, 1422, 4, 0);
INSERT INTO `patient_group` VALUES (258, 1422, 5, 0);
INSERT INTO `patient_group` VALUES (259, 1422, 6, 0);
INSERT INTO `patient_group` VALUES (260, 1422, 7, 0);
INSERT INTO `patient_group` VALUES (261, 1422, 8, 0);
INSERT INTO `patient_group` VALUES (262, 1422, 9, 0);
INSERT INTO `patient_group` VALUES (263, 1422, 12, 0);
INSERT INTO `patient_group` VALUES (264, 1422, 13, 0);
INSERT INTO `patient_group` VALUES (265, 1722, 1, 0);
INSERT INTO `patient_group` VALUES (266, 1722, 2, 0);
INSERT INTO `patient_group` VALUES (267, 1722, 3, 0);
INSERT INTO `patient_group` VALUES (268, 1722, 4, 0);
INSERT INTO `patient_group` VALUES (269, 1722, 5, 0);
INSERT INTO `patient_group` VALUES (270, 1722, 6, 0);
INSERT INTO `patient_group` VALUES (271, 1722, 7, 0);
INSERT INTO `patient_group` VALUES (272, 1722, 8, 0);
INSERT INTO `patient_group` VALUES (273, 1722, 9, 0);
INSERT INTO `patient_group` VALUES (274, 1722, 12, 0);
INSERT INTO `patient_group` VALUES (275, 1722, 13, 0);
INSERT INTO `patient_group` VALUES (276, 1355, 1, 0);
INSERT INTO `patient_group` VALUES (277, 1355, 2, 0);
INSERT INTO `patient_group` VALUES (278, 1355, 3, 0);
INSERT INTO `patient_group` VALUES (279, 1355, 4, 0);
INSERT INTO `patient_group` VALUES (280, 1355, 5, 0);
INSERT INTO `patient_group` VALUES (281, 1355, 6, 0);
INSERT INTO `patient_group` VALUES (282, 1355, 7, 0);
INSERT INTO `patient_group` VALUES (283, 1355, 8, 0);
INSERT INTO `patient_group` VALUES (284, 1355, 9, 0);
INSERT INTO `patient_group` VALUES (285, 1355, 12, 0);
INSERT INTO `patient_group` VALUES (286, 1355, 13, 0);
INSERT INTO `patient_group` VALUES (287, 1471, 1, 0);
INSERT INTO `patient_group` VALUES (288, 1471, 2, 0);
INSERT INTO `patient_group` VALUES (289, 1471, 3, 0);
INSERT INTO `patient_group` VALUES (290, 1471, 4, 0);
INSERT INTO `patient_group` VALUES (291, 1471, 5, 0);
INSERT INTO `patient_group` VALUES (292, 1471, 6, 0);
INSERT INTO `patient_group` VALUES (293, 1471, 7, 0);
INSERT INTO `patient_group` VALUES (294, 1471, 8, 0);
INSERT INTO `patient_group` VALUES (295, 1471, 9, 0);
INSERT INTO `patient_group` VALUES (296, 1471, 12, 0);
INSERT INTO `patient_group` VALUES (297, 1471, 13, 0);
INSERT INTO `patient_group` VALUES (298, 1222, 1, 0);
INSERT INTO `patient_group` VALUES (299, 1222, 2, 0);
INSERT INTO `patient_group` VALUES (300, 1222, 3, 0);
INSERT INTO `patient_group` VALUES (301, 1222, 4, 0);
INSERT INTO `patient_group` VALUES (302, 1222, 5, 0);
INSERT INTO `patient_group` VALUES (303, 1222, 6, 0);
INSERT INTO `patient_group` VALUES (304, 1222, 7, 0);
INSERT INTO `patient_group` VALUES (305, 1222, 8, 0);
INSERT INTO `patient_group` VALUES (306, 1222, 10, 0);
INSERT INTO `patient_group` VALUES (307, 1222, 12, 0);
INSERT INTO `patient_group` VALUES (308, 1222, 13, 0);
INSERT INTO `patient_group` VALUES (309, 1248, 1, 0);
INSERT INTO `patient_group` VALUES (310, 1248, 2, 0);
INSERT INTO `patient_group` VALUES (311, 1248, 3, 0);
INSERT INTO `patient_group` VALUES (312, 1248, 4, 0);
INSERT INTO `patient_group` VALUES (313, 1248, 5, 0);
INSERT INTO `patient_group` VALUES (314, 1248, 6, 0);
INSERT INTO `patient_group` VALUES (315, 1248, 7, 0);
INSERT INTO `patient_group` VALUES (316, 1248, 8, 0);
INSERT INTO `patient_group` VALUES (317, 1248, 10, 0);
INSERT INTO `patient_group` VALUES (318, 1248, 12, 0);
INSERT INTO `patient_group` VALUES (319, 1248, 13, 0);
COMMIT;

-- ----------------------------
-- Table structure for patient_queue_info
-- ----------------------------
DROP TABLE IF EXISTS `patient_queue_info`;
CREATE TABLE `patient_queue_info` (
  `register_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '登记id，主键，唯一标识本次体检',
  `patient_id` int NOT NULL COMMENT '体检用户id,唯一标识体检用户，从HIS接口获得',
  `name` varchar(30) NOT NULL COMMENT '体检用户姓名',
  `sex` varchar(2) DEFAULT '男' COMMENT '性别',
  `level` int DEFAULT '0' COMMENT '体检用户类型，0普通用户，1vip用户',
  `plan_id` int DEFAULT '1' COMMENT '体检套餐id',
  `queue_id` int DEFAULT '1' COMMENT '检查队列id',
  `register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '登记时间',
  PRIMARY KEY (`register_id`),
  UNIQUE KEY `patient_id` (`patient_id`) USING BTREE COMMENT '唯一标识体检用户'
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of patient_queue_info
-- ----------------------------
BEGIN;
INSERT INTO `patient_queue_info` VALUES (1, 1098, '张江', '男', 0, 1, 1, '2021-09-30 10:44:17');
INSERT INTO `patient_queue_info` VALUES (2, 1022, '马悦悦', '女', 0, 2, 2, '2021-09-30 11:17:48');
INSERT INTO `patient_queue_info` VALUES (6, 1077, '牛伟', '男', 0, 1, 2, '2021-09-30 14:18:43');
INSERT INTO `patient_queue_info` VALUES (8, 1023, '李立', '男', 0, 1, 2, '2021-09-30 14:29:25');
INSERT INTO `patient_queue_info` VALUES (13, 2010, '李科', '男', 0, 1, 1, '2021-09-30 14:33:39');
INSERT INTO `patient_queue_info` VALUES (14, 1044, '王冕', '男', 0, 1, 2, '2021-09-30 14:33:51');
INSERT INTO `patient_queue_info` VALUES (15, 2031, '张佳韵', '女', 0, 2, 2, '2021-09-30 14:34:15');
INSERT INTO `patient_queue_info` VALUES (16, 2079, '刘文胜', '男', 0, 1, 1, '2021-09-30 14:34:28');
INSERT INTO `patient_queue_info` VALUES (17, 732, '马志', '男', 0, 1, 1, '2021-09-30 14:35:02');
INSERT INTO `patient_queue_info` VALUES (18, 722, '张文', '男', 0, 1, 2, '2021-09-30 14:41:32');
INSERT INTO `patient_queue_info` VALUES (19, 1099, '吴鑫', '女', 0, 2, 2, '2021-09-30 14:41:55');
INSERT INTO `patient_queue_info` VALUES (20, 1121, '张章', '男', 0, 1, 1, '2021-09-30 14:42:13');
INSERT INTO `patient_queue_info` VALUES (21, 1235, '贾智文', '男', 0, 1, 1, '2021-09-30 14:42:33');
INSERT INTO `patient_queue_info` VALUES (22, 1988, '马晓亮', '男', 0, 1, 1, '2021-09-30 14:42:45');
INSERT INTO `patient_queue_info` VALUES (23, 3212, '赵宇薇', '女', 0, 2, 2, '2021-09-30 14:43:19');
INSERT INTO `patient_queue_info` VALUES (24, 4652, '张琪', '女', 0, 2, 2, '2021-09-30 14:43:37');
INSERT INTO `patient_queue_info` VALUES (25, 1033, '赵孟云', '男', 0, 1, 1, '2021-09-30 14:44:06');
INSERT INTO `patient_queue_info` VALUES (26, 1056, '张佳珂', '男', 0, 1, 1, '2021-09-30 14:44:21');
INSERT INTO `patient_queue_info` VALUES (27, 345, '吴姗姗', '女', 0, 2, 2, '2021-09-30 14:44:43');
INSERT INTO `patient_queue_info` VALUES (28, 1987, '马骝', '男', 0, 1, 1, '2021-09-30 14:45:03');
INSERT INTO `patient_queue_info` VALUES (29, 1422, '马文', '男', 0, 1, 1, '2021-10-01 14:58:16');
INSERT INTO `patient_queue_info` VALUES (30, 1722, '罗非', '男', 0, 1, 1, '2021-10-01 14:58:34');
INSERT INTO `patient_queue_info` VALUES (31, 1355, '王云', '男', 0, 1, 1, '2021-10-01 14:58:49');
INSERT INTO `patient_queue_info` VALUES (32, 1471, '孟子川', '男', 0, 1, 1, '2021-10-01 14:59:55');
INSERT INTO `patient_queue_info` VALUES (33, 1222, '李静', '女', 0, 2, 1, '2021-10-01 15:00:20');
INSERT INTO `patient_queue_info` VALUES (34, 1248, '王萌', '女', 0, 2, 2, '2021-10-01 15:03:20');
INSERT INTO `patient_queue_info` VALUES (35, 1799, '王山', '男', 0, 1, 18, '2021-10-09 17:01:00');
INSERT INTO `patient_queue_info` VALUES (36, 1399, '王阳', '男', 0, 1, 2, '2021-10-10 17:57:57');
COMMIT;

-- ----------------------------
-- Table structure for plan_group
-- ----------------------------
DROP TABLE IF EXISTS `plan_group`;
CREATE TABLE `plan_group` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '业务主键',
  `plan_id` int NOT NULL COMMENT '套餐id',
  `group_id` int NOT NULL COMMENT '检查组id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of plan_group
-- ----------------------------
BEGIN;
INSERT INTO `plan_group` VALUES (1, 1, 1);
INSERT INTO `plan_group` VALUES (2, 1, 2);
INSERT INTO `plan_group` VALUES (3, 1, 3);
INSERT INTO `plan_group` VALUES (4, 1, 4);
INSERT INTO `plan_group` VALUES (5, 1, 5);
INSERT INTO `plan_group` VALUES (6, 1, 6);
INSERT INTO `plan_group` VALUES (7, 1, 7);
INSERT INTO `plan_group` VALUES (8, 1, 8);
INSERT INTO `plan_group` VALUES (9, 1, 9);
INSERT INTO `plan_group` VALUES (10, 1, 12);
INSERT INTO `plan_group` VALUES (11, 1, 13);
INSERT INTO `plan_group` VALUES (12, 2, 1);
INSERT INTO `plan_group` VALUES (13, 2, 2);
INSERT INTO `plan_group` VALUES (14, 2, 3);
INSERT INTO `plan_group` VALUES (15, 2, 4);
INSERT INTO `plan_group` VALUES (16, 2, 5);
INSERT INTO `plan_group` VALUES (17, 2, 6);
INSERT INTO `plan_group` VALUES (18, 2, 7);
INSERT INTO `plan_group` VALUES (19, 2, 8);
INSERT INTO `plan_group` VALUES (20, 2, 10);
INSERT INTO `plan_group` VALUES (22, 2, 12);
INSERT INTO `plan_group` VALUES (23, 2, 13);
COMMIT;

-- ----------------------------
-- Table structure for plan_item
-- ----------------------------
DROP TABLE IF EXISTS `plan_item`;
CREATE TABLE `plan_item` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '业务主键',
  `plan_id` int NOT NULL COMMENT '套餐id',
  `item_id` int NOT NULL COMMENT '项目id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of plan_item
-- ----------------------------
BEGIN;
INSERT INTO `plan_item` VALUES (1, 1, 1);
INSERT INTO `plan_item` VALUES (2, 1, 2);
INSERT INTO `plan_item` VALUES (3, 1, 3);
INSERT INTO `plan_item` VALUES (4, 1, 4);
INSERT INTO `plan_item` VALUES (5, 1, 5);
INSERT INTO `plan_item` VALUES (6, 1, 6);
INSERT INTO `plan_item` VALUES (7, 1, 7);
INSERT INTO `plan_item` VALUES (8, 1, 8);
INSERT INTO `plan_item` VALUES (9, 1, 10);
INSERT INTO `plan_item` VALUES (10, 1, 11);
INSERT INTO `plan_item` VALUES (11, 1, 12);
INSERT INTO `plan_item` VALUES (12, 1, 13);
INSERT INTO `plan_item` VALUES (13, 1, 14);
INSERT INTO `plan_item` VALUES (14, 1, 16);
INSERT INTO `plan_item` VALUES (15, 1, 18);
INSERT INTO `plan_item` VALUES (16, 2, 1);
INSERT INTO `plan_item` VALUES (17, 2, 2);
INSERT INTO `plan_item` VALUES (18, 2, 3);
INSERT INTO `plan_item` VALUES (19, 2, 4);
INSERT INTO `plan_item` VALUES (20, 2, 5);
INSERT INTO `plan_item` VALUES (21, 2, 6);
INSERT INTO `plan_item` VALUES (22, 2, 7);
INSERT INTO `plan_item` VALUES (23, 2, 9);
INSERT INTO `plan_item` VALUES (24, 2, 10);
INSERT INTO `plan_item` VALUES (25, 2, 11);
INSERT INTO `plan_item` VALUES (26, 2, 12);
INSERT INTO `plan_item` VALUES (27, 2, 13);
INSERT INTO `plan_item` VALUES (28, 2, 14);
INSERT INTO `plan_item` VALUES (29, 2, 15);
INSERT INTO `plan_item` VALUES (30, 2, 16);
INSERT INTO `plan_item` VALUES (31, 1, 15);
INSERT INTO `plan_item` VALUES (33, 2, 18);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
